/**
* @file menu_widget.c
* @brief this is a brief description
* @details this is the detail description.
* @author fulong 
* @data 2014/10/16
* @version 1.0
* @par Copyright (c):
* @par First build
*     version: fulong 
*     data: 2014/10/16
*/
#include "XT11033_menu_widget.h"
#include "../../../../app/menu/menu_common.h"
#include "../../../../app/menu/menu_process.h"
#include "XT11033_button_process.h"
#include "../../../../hal/action/action.h"

#ifdef __XT11033__
#ifdef MENU_ENABLE

extern uint8 param[ PARAM_MAX ];
extern inner_proc_struct inner_proc_var[ MENU_MAX_COUNT ];
extern menu_id_table_struct menu_widget_table;
extern menu_id_table_index_struct menu_widget_index;
//控件
// 显示当前程序编码菜单的控件 0
static_text_widget_struct menu_static_text;
display_text_widget_struct menu_dis_text;
display_text_widget_struct menu_dis_text1;
//监控菜单 1
display_text_widget_struct watch_dis_text0;
display_text_widget_struct watch_dis_text1;
display_text_widget_struct watch_dis_text2;
menu_button_struct  watch_button1;
//密码菜单   2
display_text_widget_struct passwd_dis_text0;
display_text_widget_struct passwd_dis_text1;
display_text_widget_struct passwd_dis_text2;
menu_button_struct  passwd_button_sure;
menu_button_struct  passwd_button_up;
menu_button_struct  passwd_button_select;
//进入参数设置菜单  3
static_text_widget_struct entter_setting_static_text0;
display_text_widget_struct enter_setting_dis_text1;
display_text_widget_struct enter_setting_dis_text2;
menu_button_struct  enter_setting_button_sure;
menu_button_struct  enter_setting_button_up;
menu_button_struct  enter_setting_button_select;
//参数设置菜单   4
display_text_widget_struct setting_dis_text0;
display_text_widget_struct setting_dis_text1;
display_text_widget_struct setting_dis_text2;
menu_button_struct  setting_button_sure;
menu_button_struct  setting_button_up;
menu_button_struct  setting_button_select;
//设置程序选择编码菜单
static_text_widget_struct program_sel_static_text;
display_text_widget_struct program_sel_dis_text1;
display_text_widget_struct program_sel_dis_text2;
menu_button_struct  program_sel_button_sure;
menu_button_struct  program_sel_button_up;
menu_button_struct  program_sel_button_select;
void menu_widget_create(void) {
    uint8 len = 0;
    //显示当前程序编码菜单的控件
    menu_static_text.static_text = "C";
    menu_static_text.static_text_x = 0;
    menu_static_text.static_text_y = 0;
    menu_static_text.static_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 0;
    menu_static_text.static_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    menu_static_text.static_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 0;
    menu_static_text.static_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = STATIC_TEXT;
    menu_widget_table.menu_table[len] = (void *)&menu_static_text;
    len++;
    menu_dis_text.dis_var =  (read_action_param(101) / 10) % 10;
    menu_dis_text.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 0;
    menu_dis_text.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    menu_dis_text.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 1;
    menu_dis_text.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    menu_dis_text.dis_text_x = 1;
    menu_dis_text.dis_text_y = 0;
    menu_dis_text.flash_enable = 0;
    menu_dis_text.delay_flash_flag = MENU_FLASH_FLAG; 
    menu_dis_text.display_clr_flag = 0;
    menu_widget_table.menu_table[len] = (void *)&menu_dis_text;
    len++;
    menu_dis_text1.dis_var = read_action_param(101) % 10;
    menu_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 0;
    menu_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    menu_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 2;
    menu_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    menu_dis_text1.dis_text_x = 2;
    menu_dis_text1.dis_text_y = 0;
    menu_dis_text1.flash_enable = 0;
    menu_dis_text1.delay_flash_flag = MENU_FLASH_FLAG1;
    menu_dis_text1.display_clr_flag = 0;
    menu_widget_table.menu_table[len] = (void *)&menu_dis_text1;
    len++;
//监控菜单
    watch_dis_text0.dis_var = 0;
    watch_dis_text0.dis_text_x = 0;
    watch_dis_text0.dis_text_y = 0;
    watch_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 1;
    watch_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    watch_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 3;
    watch_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    watch_dis_text0.delay_flash_flag = MENU_FLASH_FLAG;
    watch_dis_text0.display_clr_flag = 0;
    watch_dis_text0.flash_enable = 0;
    menu_widget_table.menu_table[len] = (void *)&watch_dis_text0;
    len++;

    watch_dis_text1.dis_var = 0;
    watch_dis_text1.dis_text_x = 1;
    watch_dis_text1.dis_text_y = 0;
    watch_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 1;
    watch_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    watch_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 4;
    watch_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    watch_dis_text1.delay_flash_flag = MENU_FLASH_FLAG1;
    watch_dis_text1.display_clr_flag = 0;
    watch_dis_text1.flash_enable = 0;
    menu_widget_table.menu_table[len] = (void *)&watch_dis_text1;
    len++;

    watch_dis_text2.dis_var = 0;
    watch_dis_text2.dis_text_x = 2;
    watch_dis_text2.dis_text_y = 0;
    watch_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 1;
    watch_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    watch_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 5;
    watch_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    watch_dis_text2.delay_flash_flag = MENU_FLASH_FLAG2;
    watch_dis_text2.display_clr_flag = 0;
    watch_dis_text2.flash_enable = 0;
    menu_widget_table.menu_table[len] = (void *)&watch_dis_text2;
    len++;

    watch_button1.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 1;
    watch_button1.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    watch_button1.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 6;
    watch_button1.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_CONTINUE_BUTTON_PRESS;
    watch_button1.delay_button_time = 1000;
    watch_button1.bind_key = 0x7;
    watch_button1.delay_button_node = WIDGET_BUTTON_DELAY_ENABLE;
    watch_button1.menu_button_proc_fun = enter_passwd_button;
    menu_widget_table.menu_table[len] = (void *)&watch_button1;
    len++;

//密码菜单
    passwd_dis_text0.dis_var = 0;
    passwd_dis_text0.dis_text_x = 0;
    passwd_dis_text0.dis_text_y = 0;
    passwd_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 2;
    passwd_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    passwd_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 7;
    register_ctrllable_table(7);
    passwd_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    passwd_dis_text0.delay_flash_flag = MENU_FLASH_FLAG;
    passwd_dis_text0.display_clr_flag = 0;
    passwd_dis_text0.flash_enable = 0;
    menu_widget_table.menu_table[len] = (void *)&passwd_dis_text0;
    len++;

    passwd_dis_text1.dis_var = 0;
    passwd_dis_text1.dis_text_x = 1;
    passwd_dis_text1.dis_text_y = 0;
    passwd_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 2;
    passwd_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    passwd_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 8;
    passwd_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    passwd_dis_text1.delay_flash_flag = MENU_FLASH_FLAG1;
    register_ctrllable_table(8);
    passwd_dis_text1.display_clr_flag = 0;
    passwd_dis_text1.flash_enable = 0;
    menu_widget_table.menu_table[len] = (void *)&passwd_dis_text1;
    len++;

    passwd_dis_text2.dis_var = 0;
    passwd_dis_text2.dis_text_x = 2;
    passwd_dis_text2.dis_text_y = 0;
    passwd_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 2;
    passwd_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    passwd_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 9;
    passwd_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    register_ctrllable_table(9);
    passwd_dis_text2.delay_flash_flag = MENU_FLASH_FLAG2;
    passwd_dis_text2.display_clr_flag = 0;
    passwd_dis_text2.flash_enable = 1;
    menu_widget_table.menu_table[len] = (void *)&passwd_dis_text2;
    len++;

    passwd_button_up.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 2;
    passwd_button_up.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    passwd_button_up.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 10;
    passwd_button_up.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    passwd_button_up.delay_button_time = 0;
    passwd_button_up.bind_key = 0x4;
    passwd_button_up.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    passwd_button_up.menu_button_proc_fun = menu_passwd_button_up;
    menu_widget_table.menu_table[len] = (void *)&passwd_button_up;
    len++;

    passwd_button_select.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 2;
    passwd_button_select.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    passwd_button_select.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 11;
    passwd_button_select.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    passwd_button_select.delay_button_time = 0;
    passwd_button_select.bind_key = 0x2;
    passwd_button_select.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    passwd_button_select.menu_button_proc_fun = menu_passwd_button_select;
    menu_widget_table.menu_table[len] = (void *)&passwd_button_select;
    len++;

    passwd_button_sure.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 2;
    passwd_button_sure.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    passwd_button_sure.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 12;
    passwd_button_sure.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    passwd_button_sure.delay_button_time = 0;
    passwd_button_sure.bind_key = 0x1;
    passwd_button_sure.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    passwd_button_sure.menu_button_proc_fun = menu_passwd_button_sure;
    menu_widget_table.menu_table[len] = (void *)&passwd_button_sure;
    len++;
    //进入参数设置菜单
    entter_setting_static_text0.static_text = "P";
    entter_setting_static_text0.static_text_x = 0;
    entter_setting_static_text0.static_text_y = 0;
    entter_setting_static_text0.static_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 3;
    entter_setting_static_text0.static_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    entter_setting_static_text0.static_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 13;
    entter_setting_static_text0.static_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = STATIC_TEXT;
    menu_widget_table.menu_table[len] = (void *)&entter_setting_static_text0;
    len++;
    enter_setting_dis_text1.dis_var = 0;
    enter_setting_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 3;
    enter_setting_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    enter_setting_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 14;
    enter_setting_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    enter_setting_dis_text1.dis_text_x = 1;
    enter_setting_dis_text1.dis_text_y = 0;
    enter_setting_dis_text1.flash_enable = 0;
    enter_setting_dis_text1.delay_flash_flag = MENU_FLASH_FLAG;
    enter_setting_dis_text1.display_clr_flag = 0;
    menu_widget_table.menu_table[len] = (void *)&enter_setting_dis_text1;
    register_ctrllable_table(14);
    len++;
    enter_setting_dis_text2.dis_var = 0;
    enter_setting_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 3;
    enter_setting_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    enter_setting_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 15;
    enter_setting_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    enter_setting_dis_text2.dis_text_x = 2;
    enter_setting_dis_text2.dis_text_y = 0;
    enter_setting_dis_text2.flash_enable = 1;
    enter_setting_dis_text2.delay_flash_flag = MENU_FLASH_FLAG1;
    enter_setting_dis_text2.display_clr_flag = 0;
    menu_widget_table.menu_table[len] = (void *)&enter_setting_dis_text2;
    len++;
    register_ctrllable_table(15);

    enter_setting_button_up.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 3;
    enter_setting_button_up.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    enter_setting_button_up.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 16;
    enter_setting_button_up.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    enter_setting_button_up.delay_button_time = 0;
    enter_setting_button_up.bind_key = 0x4;
    enter_setting_button_up.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    enter_setting_button_up.menu_button_proc_fun = menu_passwd_button_up;
    menu_widget_table.menu_table[len] = (void *)&enter_setting_button_up;
    len++;

    enter_setting_button_select.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 3;
    enter_setting_button_select.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    enter_setting_button_select.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 17;
    enter_setting_button_select.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    enter_setting_button_select.delay_button_time = 0;
    enter_setting_button_select.bind_key = 0x2;
    enter_setting_button_select.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    enter_setting_button_select.menu_button_proc_fun = menu_passwd_button_select;
    menu_widget_table.menu_table[len] = (void *)&enter_setting_button_select;
    len++;

    enter_setting_button_sure.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 3;
    enter_setting_button_sure.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    enter_setting_button_sure.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 18;
    enter_setting_button_sure.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    enter_setting_button_sure.delay_button_time = 0;
    enter_setting_button_sure.bind_key = 0x1;
    enter_setting_button_sure.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    enter_setting_button_sure.menu_button_proc_fun = menu_enter_setting_button_sure;
    menu_widget_table.menu_table[len] = (void *)&enter_setting_button_sure;
    len++;
// 参数设置菜单
    setting_dis_text0.dis_var = 0;
    setting_dis_text0.dis_text_x = 0;
    setting_dis_text0.dis_text_y = 0;
    setting_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 4;
    setting_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    setting_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 19;
    register_ctrllable_table(19);
    setting_dis_text0.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    setting_dis_text0.delay_flash_flag = MENU_FLASH_FLAG;
    setting_dis_text0.display_clr_flag = 0;
    setting_dis_text0.flash_enable = 0;
    menu_widget_table.menu_table[len] = (void *)&setting_dis_text0;
    len++;

    setting_dis_text1.dis_var = 0;
    setting_dis_text1.dis_text_x = 1;
    setting_dis_text1.dis_text_y = 0;
    setting_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 4;
    setting_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    setting_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 20;
    setting_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    setting_dis_text1.delay_flash_flag = MENU_FLASH_FLAG1;
    register_ctrllable_table(20);
    setting_dis_text1.display_clr_flag = 0;
    setting_dis_text1.flash_enable = 0;
    menu_widget_table.menu_table[len] = (void *)&setting_dis_text1;
    len++;

    setting_dis_text2.dis_var = 0;
    setting_dis_text2.dis_text_x = 2;
    setting_dis_text2.dis_text_y = 0;
    setting_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 4;
    setting_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    setting_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 21;
    setting_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    register_ctrllable_table(21);
    setting_dis_text2.delay_flash_flag = MENU_FLASH_FLAG2;
    setting_dis_text2.display_clr_flag = 0;
    setting_dis_text2.flash_enable = 1;
    menu_widget_table.menu_table[len] = (void *)&setting_dis_text2;
    len++;
    setting_button_up.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 4;
    setting_button_up.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    setting_button_up.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 22;
    setting_button_up.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    setting_button_up.delay_button_time = 0;
    setting_button_up.bind_key = 0x4;
    setting_button_up.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    setting_button_up.menu_button_proc_fun = menu_passwd_button_up;
    menu_widget_table.menu_table[len] = (void *)&setting_button_up;
    len++;

    setting_button_select.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 4;
    setting_button_select.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    setting_button_select.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 23;
    setting_button_select.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    setting_button_select.delay_button_time = 0;
    setting_button_select.bind_key = 0x2;
    setting_button_select.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    setting_button_select.menu_button_proc_fun = menu_passwd_button_select;
    menu_widget_table.menu_table[len] = (void *)&setting_button_select;
    len++;
    setting_button_sure.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 4;
    setting_button_sure.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    setting_button_sure.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 24;
    setting_button_sure.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    setting_button_sure.delay_button_time = 0;
    setting_button_sure.bind_key = 0x1;
    setting_button_sure.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    setting_button_sure.menu_button_proc_fun = menu_setting_button_sure;
    menu_widget_table.menu_table[len] = (void *)&setting_button_sure;
    len++;

    //设置程序选择编码菜单
    program_sel_static_text.static_text = "C";
    program_sel_static_text.static_text_x = 0;
    program_sel_static_text.static_text_y = 0;
    program_sel_static_text.static_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 5;
    program_sel_static_text.static_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    program_sel_static_text.static_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 25;
    program_sel_static_text.static_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = STATIC_TEXT;
    menu_widget_table.menu_table[len] = (void *)&program_sel_static_text;
    len++;
    program_sel_dis_text1.dis_var = 0;
    program_sel_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 5;
    program_sel_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    program_sel_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 26;
    program_sel_dis_text1.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    program_sel_dis_text1.dis_text_x = 1;
    program_sel_dis_text1.dis_text_y = 0;
    program_sel_dis_text1.flash_enable = 0;
    program_sel_dis_text1.delay_flash_flag = MENU_FLASH_FLAG;
    program_sel_dis_text1.display_clr_flag = 0;
    menu_widget_table.menu_table[len] = (void *)&program_sel_dis_text1;
    register_ctrllable_table(26);
    len++;
    program_sel_dis_text2.dis_var = 0;
    program_sel_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 5;
    program_sel_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_TEXT;
    program_sel_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 27;
    program_sel_dis_text2.dis_txt_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = DISPLAY_TEXT;
    program_sel_dis_text2.dis_text_x = 2;
    program_sel_dis_text2.dis_text_y = 0;
    program_sel_dis_text2.flash_enable = 1;
    program_sel_dis_text2.delay_flash_flag = MENU_FLASH_FLAG1;
    program_sel_dis_text2.display_clr_flag = 0;
    menu_widget_table.menu_table[len] = (void *)&program_sel_dis_text2;
    register_ctrllable_table(27);
    len++;
    program_sel_button_up.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 5;
    program_sel_button_up.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    program_sel_button_up.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 28;
    program_sel_button_up.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    program_sel_button_up.delay_button_time = 0;
    program_sel_button_up.bind_key = 0x4;
    program_sel_button_up.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    program_sel_button_up.menu_button_proc_fun = menu_passwd_button_up;
    menu_widget_table.menu_table[len] = (void *)&program_sel_button_up;
    len++;

    program_sel_button_select.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 5;
    program_sel_button_select.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    program_sel_button_select.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 30;
    program_sel_button_select.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    program_sel_button_select.delay_button_time = 0;
    program_sel_button_select.bind_key = 0x2;
    program_sel_button_select.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    program_sel_button_select.menu_button_proc_fun = menu_passwd_button_select;
    menu_widget_table.menu_table[len] = (void *)&program_sel_button_select;
    len++;
    program_sel_button_sure.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.menu_id4widget = 5;
    program_sel_button_sure.button_widget_id.menu_widget_seg.widget_seg0.bit0_widget_seg.widget_proc_type = WIDGET_BUTTON;
    program_sel_button_sure.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.menu_widget_id = 31;
    program_sel_button_sure.button_widget_id.menu_widget_seg.widget_seg1.bit1_widget_seg.widget_seg_type = MENU_BUTTON_PRESS;
    program_sel_button_sure.delay_button_time = 0;
    program_sel_button_sure.bind_key = 0x1;
    program_sel_button_sure.delay_button_node = WIDGET_BUTTON_DELAY_DISABLE;
    program_sel_button_sure.menu_button_proc_fun = menu_program_sel_button_sure;
    menu_widget_table.menu_table[len] = (void *)&program_sel_button_sure;
    len++;

    menu_widget_index.menu_table_index[0] = 0;
    inner_proc_var[0].inner_proc_time = 2000;
    inner_proc_var[0].inner_proc_type = OVERTIME_OPERA;
    inner_proc_var[0].extend_var = 1; //跳转到菜单1
    menu_widget_index.menu_table_index[1] = 3;
    menu_widget_index.menu_table_index[2] = 7;
    menu_widget_index.menu_table_index[3] = 13;
    inner_proc_var[3].inner_proc_time = 8000;
    inner_proc_var[3].inner_proc_type = OVERTIME_OPERA;
    inner_proc_var[3].extend_var = 1; //跳转到菜单1
    menu_widget_index.menu_table_index[4] = 19;
    menu_widget_index.menu_table_index[5] = 25;
    menu_widget_index.menu_count = 6;
    menu_widget_table.menu_widget_count = len;
}
#endif
#endif
